package com.h.chatroom.service.impl;

import com.h.chatroom.mapper.MessageMapper;
import com.h.chatroom.pojo.dataobject.Message;
import com.h.chatroom.service.MessageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class MessageServiceImpl implements MessageService {
    @Autowired
    private MessageMapper messageMapper;

    @Override
    public List<Message> getMessage(Integer sessionId) {
        List<Message> messagesBySessionId = messageMapper.getMessagesBySessionId(sessionId);
        return  messagesBySessionId;
    }
}
